#include <iostream>
using namespace std; 
template<typename T>
class complex{
public:
	complex(T r,T i):re(r),im(i){}
	complex& operator +=(const complex&);
	T real() const{
		return re;
	}
	T imag() const{
		return im;
	}
private:
	T re,im;
	friend complex& _doap1(complex*,const complex&);
};
int main()
{
	complex<double> c1(2.5,1.5);
	c1.real();
	complex<int> c2(2,6);
}
